﻿#region  
//=====================================================
// 文件名: TestAssetBundleManager                
// 创建者: #AuthorName#                
// 创建时间: #CreateTime#              	
// Email: #AuthorEmail#               
// 描述: 当前脚本的功能              
// 修改者列表: 修改者名字以及修改功能      
// 版权所有: #Copyright#                 
//======================================================
#endregion 



using FrameWork;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using FrameWork.Reource;
using UnityEngine.UI;

public class TestAssetBundleManager : MonoBehaviour
{
    private GameObject item;
    private void Awake()
    {
        AssetBundleManager.Instance.LoadAssetBundleConfig();
    }
    private void Start()
    {
        item = ResourceManager.Instance.LoadResource<GameObject>("Assets/GameMain/Prefabs/Test1/Test1.prefab");
        Sprite sprite = ResourceManager.Instance.LoadResource<Sprite>("Assets/GameMain/Picture/cat.jpg");
        GameObject.Find("Image").GetComponent<Image>().sprite = sprite;
       
    }
    private void Update()
    {
        if (Input.GetKeyDown(KeyCode.K))
        {
            ResourceManager.Instance.ReleaseResource(item);
        }

        if (Input.GetKeyDown(KeyCode.U))
        {
            GameObject.Instantiate(item);
        }
    }
}
